Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: @If or if condition
Feedback Type: Problem
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Functionality
Platform: Windows XP client
Release: 8.5
Reproducible: -Reproducibility-

I have the following code in a xpage postSaveDocument event. It works fine.

var db:NotesDatabase = session.getDatabase(session.getServerName(), "TimeOffxp.nsf");
var agent:NotesAgent = db.getAgent;
agent.runOnServer(dominoDocument1.getNoteID());

Now, I want to add a condition so it only run when it is a new document. I tried the following codes and none of them seems work for me.
(1)
var db:NotesDatabase = session.getDatabase(session.getServerName(), "TimeOffxp.nsf");
var agent:NotesAgent = db.getAgent;
@If(@IsNewDoc()==1,agent.runOnServer(dominoDocument1.getNoteID()));
(2)
var db:NotesDatabase = session.getDatabase(session.getServerName(), "TimeOffxp.nsf");
var agent:NotesAgent = db.getAgent;
if(@IsNewDoc()==1){
agent.runOnServer(dominoDocument1.getNoteID());
}
Please advise what are the correct ways/formats to set if condition in xpage. Thanks.


Feedback number WEBB7UMRY9 created by ~John Prewetexoni on 08/05/2009

Status: Open
Comments:

@If or if condition (~John Prewetexo... 5.Aug.09)
. . Re @If or if condition (~John Prewetexo... 5.Aug.09)
. . . . viewScope variable (~Maria Xanjumib... 6.Aug.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS